Chapter 5: Substitutions

5.1: quoting, 5.1.1: backslashes, 5.1.2: single quotes, 5.1.3: posix quotes, 5.1.4: double quotes, 5.1.5: backquotes, 5.2: modifiers and what they modify, 5.3: process substitution, 5.4: parameter substitution, 5.4.1: using arrays, 5.4.2: using associative arrays, 5.4.3: substituted substitutions, top- and tailing, etc., 5.4.4: flags for options: splitting and joining, 5.4.5: flags for options: glob_subst and rc_expand_param, 5.4.6: yet more parameter flags, 5.4.7: a couple of parameter substitution tricks, 5.4.8: nested parameter substitutions, 5.5: that substitution again, 5.6: arithmetic expansion, 5.6.1: entering and outputting bases, 5.6.2: parameter typing, 5.7: brace expansion and arrays, 5.8: filename expansion, 5.9: filename generation and pattern matching, 5.9.1: comparing patterns and regular expressions, 5.9.2: standard features, 5.9.3: extensions usually available, 5.9.4: extensions requiring extended_glob, 5.9.5: recursive globbing, 5.9.6: glob qualifiers, 5.9.7: globbing flags: alter the behaviour of matches, 5.9.8: the function zmv.

It's FOSS

Fixing "zsh: bad assignment" error in Linux

Abhishek Prakash

The other day I was trying to create an alias in Linux for repetitive commands. An alias is a name that is translated as another name or command (or a set of commands).

So, I tried to create the alias in the following manner:

And it threw me the following error:

If you are a regular user of the Linux command line, you must have identified the error on the previous command. But I was preoccupied with my program in C++ and I did not notice the obvious error here.

In fact, I thought it to be an error with the way I used the combination of error for the alias. So, I fiddled for a couple of minutes and just to make sure what I was doing wrong, tried this command:

Now, I was certain that there was no error with the commands this time but I git the same result as above:

And that’s when I realized my mistake. You see, I have been working a lot with C++ and was following the standard of using spaces before and after the assignment operator (=). And that is what I used here as well. And shell does not like the wastage of “space”.

I removed the extra white spaces before and after the = and voilà! There it worked like a charm.

In fact, the same error can be encountered with the export command as well or any other variable assignments in the shell. There should not be spaces before and after equals sign.

This taught me a lesson to not waste white space while dealing with shell scripts and Linux commands. It’s not the same as writing programs in other languages.

I would add this tiny learning lesson to my list of things to know about the Linux terminal.

assignment zsh

I hope you would not have to waste your time with this problem if you mind those spaces before and after the equals sign.

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Open External Links in AppImage for Login

Fixing applications icon missing from the launcher in ubuntu, reset forgotten root password in ubuntu, handling 'cannot refresh snap-store' error in ubuntu 24.04, fixing update-grub command not found error in arch linux, become a better linux user.

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Your link has expired.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to make a permanent alias in oh-my-zsh?

In my .zshrc I tried to make a few aliases .I looked into a lot of places, but I couldn't find out a way that worked. I used this code below:

Then I wrote a command source ~/.zshrc . Still it didn't resolve the issue. I get error messages like zsh: command not found: j

Could anyone help me with any suggestions and let me know what am I doing wrong?

  • command-line

Adaephon's user avatar

  • 4 Judging from the (mutliple) comments and from the error I suppose each alias is actually set on a single line, correct? –  kos Commented Apr 17, 2016 at 22:49

There must not be any whitespaces around between = and either alias name or alias definition:

BTW: If you are looking for a way to shorten directory names, I suggest looking into Named Directories and the AUTO_CD option instead of aliases:

This allows you to use ~w instead of ~/Documents/UoMWorkspace/Semester2 and ~j instead of ~/Documents/UoMWorkspace/Semester2/COMP17412 (or ~w/COMP17412 ). So cd ~j is identical to cd ~/Documents/UoMWorkspace/Semester2 . It also works as part of a path, e.g. cat ~j/somedir/somefile .

zsh will automatically cd to a directory if it is given as command on the command line and it is not the name of an actual command. e.g.

  • 1 As a further explanation why not use spaces before and after the equation sign:e.g. a = b : This will be considered as a command a with two parameters ( b and = ) and will throw an error: zsh: command not found: a . If you put alias before that ( alias a = b ), it will be somehow similar. –  Timo Commented Oct 22, 2017 at 7:29
  • 1 Isn't that AUTO_CD cause your command history unreadable? –  nanono Commented Apr 18, 2020 at 3:34
  • 2 @nanono That depends on what you mean by "unreadable". By itself AUTO_CD does nothing more than allow to switch into directories by only using their paths instead of using the cd command. Of course, if you make active use of this feature, it is not easy to tell from the history whether the command docs ran a executable of that name or if it was used to switch into a directory named "docs". –  Adaephon Commented Apr 21, 2020 at 15:04
  • Special thanks for shortening directories names - I have been looking for it –  bora89 Commented Jan 7, 2021 at 14:08

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged command-line alias zsh ..

  • The Overflow Blog
  • The creator of Jenkins discusses CI/CD and balancing business with open source
  • The evolution of full stack engineers
  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • Join Stack Overflow’s CEO and me for the first Stack IRL Community Event in...

Hot Network Questions

  • Parsing and processing "resolvectl statistics" output using awk
  • Colossians 1:16 New World Translation renders τα πάντα as “all other things” but why is this is not shown in their Kingdom Interlinear?
  • Somebody used recommendation by an in-law – should I report it?
  • Do images have propositional content?
  • Can someone confirm this observed bug for `bc`? `scale=0` has no effect!
  • Movie / episode where a spaceplane is stuck in orbit
  • Has anyone returned from space in a different vehicle from the one they went up in? And if so who was the first?
  • What is vi command package?
  • Would superhuman elites allow for more liberal governance?
  • Thread-safe write-efficient register() method for a Load balancer
  • How do you make the vacuum seal on a glass jar?
  • Convert double rocker switch into single digital timer - how to make this work
  • Advice how to prevent sin
  • ESTA for dual national: what can happen if I lie about being American?
  • What is name of the background graph at the Approach0's site?
  • The quest for a Wiki-less Game
  • How to define an empty default-style?
  • Consistency-proof of ZFC
  • Can the planet Neptune be seen from Earth with binoculars?
  • Does this policy mean that my work has flawed password storage?
  • How to fold or expand the wingtips on Boeing 777?
  • Is it ok to assert on the behavior of return values of a testable class?
  • Why does each leg of my 240V outlet measure 125V to ground, but 217V across the hot wires?
  • Advanced Composite Solar Sail (ACS3) Orbit

assignment zsh

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working . The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ?

There are also some other examples of similar behaviour like this:

This results in the following output:

If I put quotes around the 'x="$(echo "a b")" in all cases I get the correct variable assignment.

If I run the same thing in bash, I get 'a b' for all functions.

Can someone explain why bash and zsh are acting differently here ?

  • environment-variables

Community's user avatar

If you run your script with -x (both bash and zsh ) you will see that the $(...) code gets interpreted/parsed differently. This is because, as stated in the FAQ , word splitting in zsh is backwards/bash/sh incompatible.

You can use SH_WORD_SPLIT to address this difference.

Ok, so it is not a word split problem as we have a command substitution, quoting the docs again:

...If the substitution is not enclosed in double quotes, the output is broken into words using the IFS parameter...

So your alternative is to local IFS="" :/

Felipe Lema's user avatar

  • that doesn't seem to work: zsh -x test.sh +test.sh:1> setopt shwordsplit +test.sh:21> myfun +myfun:2> echo 'a b' +myfun:2> local 'x=a' b +myfun:2> echo a –  theooze Commented Jun 29, 2015 at 12:19

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged bash shell zsh environment-variables ..

  • The Overflow Blog
  • The creator of Jenkins discusses CI/CD and balancing business with open source
  • The evolution of full stack engineers
  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • Join Stack Overflow’s CEO and me for the first Stack IRL Community Event in...

Hot Network Questions

  • Problem in solving an integral equation.
  • What do these expressions mean in NASA's Steve Stitch's brief Starliner undocking statement?
  • Is this map real?
  • How can I power 28VDC devices from a 24VDC system?
  • Generating function for A300483 (related to Chebyshev polynomial of first kind)
  • When a mass crosses a black hole event horizon does the horizon radius get larger closer to the mass or does it increase equally everywhere?
  • Is the white man at the other side of the Joliba river a historically identifiable person?
  • Why is Stam Mishna attributed to R' Meir, a fourth-generation Tannah?
  • What's the best format or way to generate a short-lived access token?
  • What are the steps to write a book?
  • Looking for the name of a possibly fictional science fiction TV show
  • traceroute (UDP) lost packets
  • Are there epistemic vices?
  • What exactly was Teddy KGB's tell that Mike identified?
  • What prevents random software installation popups from mis-interpreting our consents
  • Movie / episode where a spaceplane is stuck in orbit
  • Mistake on car insurance policy about use of car (commuting/social)
  • Does Poincare recurrence show that Gibbs entropy is not strictly increasing?
  • How much technological progress could a group of modern people make in a century?
  • Flats on gravel with GP5000 - what am I doing wrong?
  • How to create rounded arrows to highlight inflection points in a TikZ graph?
  • Wrong explanation for why "electron can't exist in the nucleus"?
  • Could they free up a docking port on ISS by undocking the emergency vehicle and letting it float next to the station for a little while
  • How to fold or expand the wingtips on Boeing 777?

assignment zsh

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(eval):15 bad assignment when using '=' as alias #523

@japborst

japborst commented Aug 19, 2018

This is similar to but I get a different error:

As a result, all plugin aliases are gone.

I'm using the zsh plugin, which aliases the . When I remove this plugin, I get no errors and got all plugin aliases.

How can I best debug to provide more info?

@danielshahaf

danielshahaf commented Aug 19, 2018

Give the values of $ZSH_VERSION, $ZSH_PATCHLEVEL, $ZSH_HIGHLIGHT_REVISION, and $ZSH_HIGHLIGHT_VERSION; do and post the last few lines; find a reproducer that starts with and uses no external plugins. involved patches both to zsh and to z-sy-h, but they've both been released some time ago.

Can you be a bit clearer about what your setup is and what the result is. Are you saying that with calc and z-sy-h the alias is absent and with calc but without z-sy-h the alias is present?

For reference, with current zsh and z-sy-h —

]='echo foo' % source ./zsh-syntax-highlighting.zsh ./zsh-syntax-highlighting.zsh:31: invalid alias '=' encountered while printing aliases

Sorry, something went wrong.

Excuse brevity.

My current set-up is the following:

Running on Bash for Windows with Ubuntu 16.04.5 LTS

With z-sy-h, but without the calc plugin:

With z-sy-h and the calc plugin:

Without z-sy-h but with calc:

This gives me a different error that you have:

]='echo foo' SurfacePro3% source ./zsh-syntax-highlighting.zsh (eval):1: bad assignment

Workaround is by sourcing manually after z-sy-h is sourced.

So in :

and at the very end:

The driver has code to undefine and redefine aliases before/after it's sourced. That's needed to be sure user aliases don't take effect in z-sy-h's code. The "redefine" code —

Lines 435 to 437 in

# Restore the aliases we unned
eval "$zsh_highlight__aliases"
builtin unset zsh_highlight__aliases

I recommend that you upgrade zsh. (You seem to be on Debian jessie/oldstable. Debian stretch/stable is new enough.) Your workaround is good too.

To devs: 1. I'm not sure if calc defines widgets; if it does, the workaround would require redrawhook to be merged for full functionality; 2. if #252 were implemented it would sidestep this class of issues entirely.

An alternative workaround is to disable the undefine/redefine code: that's the chunk I linked plus the corresponding chunk at the top of the file that does .

It's just a simple wrapper function around :

I was on Ubuntu/xenial but might be about time I switch to bionic. That'll update zsh as well. Will close the issue if that removes the issue :)

Sorry, but the issue tracker is our todo list, and I don't want to clutter it with open, inactionable issues. I'll close this issue now, but feel free to reopen if it occurs on zsh that has the aforementioned fixes (>=5.3.1) or if you have a patch to add support for older zsh's.

@danielshahaf

No branches or pull requests

@japborst

Show Map

Russian regions

  • Altay republic
  • Irkutsk oblast
  • Kemerovo oblast
  • Khakassia republic
  • Krasnoyarsk krai
  • Novosibirsk oblast
  • Omsk oblast
  • Tomsk oblast
  • Tuva republic
  • Map of Russia
  • All cities and regions
  • Blog about Russia
  • News from Russia
  • How to get a visa
  • Flights to Russia
  • Russian hotels
  • Renting apartments
  • Russian currency
  • FIFA World Cup 2018
  • Submit an article
  • Flowers to Russia
  • Ask our Expert

Omsk Oblast, Russia

The capital city of Omsk oblast: Omsk .

Omsk Oblast - Overview

Omsk Oblast is a federal subject of Russia located in the south-eastern part of Siberia, in the Siberian Federal District. Omsk is the capital city of the region.

The population of Omsk Oblast is about 1,879,500 (2022), the area - 141,140 sq. km.

Omsk oblast flag

Omsk oblast coat of arms.

Omsk oblast coat of arms

Omsk oblast map, Russia

Omsk oblast latest news and posts from our blog:.

10 November, 2019 / Tomsk - the view from above .

3 July, 2016 / Omsk - the view from above .

20 October, 2012 / The bear at the gate .

2 August, 2012 / Omsk city from bird's eye view .

14 December, 2011 / Time-lapse video of Omsk city .

More posts..

History of Omsk Oblast

Ancient people began to settle in the area of the middle reaches of the Irtysh River about 45,000 years ago. This region became the place of numerous migrations of different peoples, of interpenetration of forest and steppe cultures. In the Middle Ages, the territory of the present Omsk region was part of the Western Turkic Khanate and the Siberian Khanate. As a result, an ethnic group of the Siberian Tatars was formed. This region was also inhabited by Kazakhs and other peoples.

The history of the development of the Irtysh by Russians is connected first of all with the legendary Yermak. Although even before him, in the 15th century, Russian merchants from the Urals visited the Siberian Khanate.

In the early 18th century, major reforms carried out by Peter the Great required large expenses. The first Russian emperor turned his attention to the east. He sent a detachment of Cossacks under the command of the lieutenant-colonel I.D.Bukhgolts from the town of Tobolsk up the Irtysh River in search of gold deposits.

More Historical Facts…

The expedition failed because of resistance from the nomads Dzhungars. Russians were forced to take a step back. In 1716, they founded a fortress at the mouth of the Om River - future Omsk. Russian peasants began to settle in the land around the fortress. To the south of Omsk, a line of outposts was constructed for protection from the nomads.

In 1782, the fortress became a town. Omsk district was formed on the basis of the southern part of Tarsky district and, in 1785, the town of Omsk was given a coat of arms. Omsk became an important center for the study of Siberia and Central Asia. This region like other parts of Siberia was used as a place for political exile.

In the 19th century, the people exiled to Siberia were the Decembrists, Petrashevts, Narodniki, representatives of other revolutionary parties and organizations, participants of the Polish national movement. These people had a major cultural impact on the local population. The great Russian writer F.M.Dostoyevsky was one of the prisoners of the Omsk jail.

In the late 19th and early 20th century, Siberia experienced significant changes. Large-scale migration of peasants led to the rapid growth of the local economy, especially agriculture. Due to its favorable economic and geographical location, at the intersection of the Trans-Siberian Railway and the Irtysh River, Omsk rapidly turned into a large transport, trade and industrial center of Western Siberia, the largest city in Siberia.

During the Second World War, about 100 industrial plants were evacuated from the European part of the USSR to Omsk. They became the basis of the local engineering industry. In 1949, the first refinery in Siberia was constructed in Omsk. In 1954-1956, during development of virgin lands, several large agricultural enterprises were built in the southern part of Omsk Oblast. In the 1970s, Omsk oblast became one of the most economically developed regions of Siberia.

Pictures of Omsk Oblast

Wooden chapel in Omsk Oblast

Wooden chapel in Omsk Oblast

Author: Sedov Artem

Country house in Omsk Oblast

Country house in Omsk Oblast

Author: Heinrich Jena

Provincial life in the Omsk region

Provincial life in the Omsk region

Author: Baranov Pavel

Omsk Oblast - Features

Omsk Oblast is located in the south of the West Siberian Plain, in the middle reaches of the Irtysh River, with steppes in the south, which turn into forest steppes, forests and marshy tundra in the north. The territory of the region stretches for about 600 km from north to south and 300 km from west to east. In the south, Omsk Oblast borders with Kazakhstan.

The largest cities and towns of Omsk Oblast are Omsk (1,126,000), Tara (28,500), Kalachinsk (21,900), Isylkul (21,700). The main river is the Irtysh with its tributaries (the Ishim, Om, Osha, and Tara). The Trans-Siberian Railway is an important traffic artery. There is an international airport in Omsk.

The climate is continental and sharply continental. The average temperature in January is minus 19-20 degrees Celsius, in July - plus 17-18 degrees Celsius in the northern part and plus 19 degrees Celsius in the south.

Omsk Oblast has such natural resources as oil, natural gas, brown coal, iron ore, various construction materials. Main manufacturing, construction and trade are carried out in Omsk. Industrial sector is represented by military, aerospace and agricultural engineering, petrochemical, light and food industries.

Agriculture is represented by crops, dairy and beef cattle, pig and poultry farming. Cereals (wheat, rye, oats, barley), potatoes, vegetables, sunflower, and other crops are cultivated.

Attractions of Omsk Oblast

A lot of sights can be found in Omsk. The most interesting places located outside the city are:

  • Achairsky Convent in the upper reaches of the Irtysh River, 50 km from Omsk;
  • St. Nicholas Monastery in the village of Bolshekulache, 20 km from Omsk;
  • Nature reserve “Bairovsky” created for the preservation and reproduction of rare and valuable species of birds and animals;
  • Batakovo tract - a natural and archaeological park on the left bank of the Irtysh River, 150 km north of Omsk, in Bolsherechensky district;
  • Znamenskiy museum of local lore dedicated to the history and nature of Omsk oblast, located in one of the oldest settlements of the region - in the village of Znamenskoye;
  • Chudskaya mountain on the left bank of the Irtysh River, 3 km north of Znamenskoye;
  • Lake Ulzhay - a relict water reservoir in the northwest of Kurumbelskaya steppe, in Cherlaksky district, 160 km from Omsk;
  • Lake Ebeyty in the southwest of the region;
  • Lake Platovskoye located to the north-east of the village of Platovo in Polstavskiy district;
  • “Bird’s Haven” - a natural park located in Omsk;
  • “Devil’s finger” - a rock on the right bank of the Irtysh, 2 km from the village of Serebryanoye, on the territory of Gorky district.

Omsk oblast of Russia photos

Nature of omsk oblast.

Omsk Oblast landscape

Omsk Oblast landscape

Author: Vitali Ellert

Omsk Oblast scenery

Omsk Oblast scenery

Author: Yury Ermakov

Small river in Omsk Oblast

Small river in Omsk Oblast

Author: Andrey Genze

Wooden house in the Omsk region

Wooden house in the Omsk region

Winter in Omsk Oblast

Winter in Omsk Oblast

Wooden church in Omsk Oblast

Wooden church in Omsk Oblast

  • Currently 2.88/5

Rating: 2.9 /5 (140 votes cast)

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

zsh: bad subscript for direct array assignment: 0

I have the following bashscript below. My goal is to itterate over multiple files in the directory. The name of the files will be batch_1, batch_2, batch_3, batch_4 , etc. There should be no more than 7 batches.

I have the following script below.

However, when I run this I receive the error zsh: bad subscript for direct array assignment: 0

Does any know what can cause this specifically with my script? Or possible solutions? Any advice may help.

  • shell-script

Lam's user avatar

  • 2 You're still not quoting your variable expansions, and still pointlessly using curly braces. I explained why this is not a good idea in my answer to your previous question –  cas Commented Jan 26, 2022 at 4:51

Are you running this with bash , or with zsh ? You've tagged this with bash, but your question mentions a zsh error.

  • Like ksh , bash arrays start from zero.
  • zsh arrays start from one (unless you have the KSH_ARRAYS variable set). See man zshparam and search for Array Subscripts

cas's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged bash shell-script shell scripting batch-jobs ..

  • The Overflow Blog
  • The creator of Jenkins discusses CI/CD and balancing business with open source
  • The evolution of full stack engineers
  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • Join Stack Overflow’s CEO and me for the first Stack IRL Community Event in...

Hot Network Questions

  • Does this policy mean that my work has flawed password storage?
  • Why is Stam Mishna attributed to R' Meir, a fourth-generation Tannah?
  • What is vi command package?
  • How to define an empty default-style?
  • Are there epistemic vices?
  • Is it ok to assert on the behavior of return values of a testable class?
  • What is name of the background graph at the Approach0's site?
  • Could they free up a docking port on ISS by undocking the emergency vehicle and letting it float next to the station for a little while
  • Mistake on car insurance policy about use of car (commuting/social)
  • The Chofetz Chaim's Shocking View of Baalei Teshuva
  • How do you make the vacuum seal on a glass jar?
  • Somebody used recommendation by an in-law – should I report it?
  • Extract geometry information from a .shp file without the associated files
  • Humans are forbidden from using complex computers. But what defines a complex computer?
  • Different verbs for activism/advocacy
  • What are the steps to write a book?
  • Wrong explanation for why "electron can't exist in the nucleus"?
  • Coloring a 4×4 Grid
  • Textile Innovations of Pachyderms: Clothing Type
  • How cheap would rocket fuel have to be to make Mars colonization feasible (according to Musk)?
  • I want to be a observational astronomer, but have no idea where to start
  • Starting with 2014 "+" signs and 2015 "−" signs, you delete signs until one remains. What’s left?
  • What is the purpose of long plastic sleeve tubes around connections in appliances?
  • Can the planet Neptune be seen from Earth with binoculars?

assignment zsh

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

.zshrc inconsistent type for assignment?

I install MongoDB by using homebrew

and set the path within .zshrc :

export path=/usr/local/Cellar/mongodb/3.4.6/bin:$PATH

But when I open the iTerm2 , the stdout give me this:

what's this? how to solve it?

Lin Du's user avatar

2 Answers 2

I got this when changing a value for JAVA17_HOME. Doing

and then setting it again worked.

Not the original problem, which was answered, but may help people who land here while searching.

curiousity's user avatar

  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question . To get notified when this question gets new answers, you can follow this question . Once you have enough reputation , you can also add a bounty to draw more attention to this question. - From Review –  treckstar Commented Aug 23, 2022 at 0:14
  • This actually answers the question of how to resolve the error in any context outside the original question. –  Nathan McKaskle Commented Nov 30, 2022 at 15:40

Lowercase path should be uppercase.

export PATH=/usr/local/Cellar/mongodb/3.4.6/bin:$PATH

user8300829's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged bash mongodb zsh zshrc or ask your own question .

  • The Overflow Blog
  • The creator of Jenkins discusses CI/CD and balancing business with open source
  • The evolution of full stack engineers
  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • Join Stack Overflow’s CEO and me for the first Stack IRL Community Event in...
  • Feedback requested: How do you use tag hover descriptions for curating and do...
  • Staging Ground Reviewer Motivation
  • What does a new user need in a homepage experience on Stack Overflow?

Hot Network Questions

  • Unable to understand a proof of the squeeze theorem
  • Overstaying knowing I have a new Schengen visa
  • How much could gravity increase before a military tank is crushed
  • Is it ok to assert on the behavior of return values of a testable class?
  • Inertia Action on Kummer Sheaves
  • When is an analogy a weak analogy?
  • What exactly was Teddy KGB's tell that Mike identified?
  • Children's book about intelligent bears or maybe cats
  • Is there mathematical significance to the LaGuardia floor tiles?
  • Analog story - US provides food machines to other nations, with hidden feature
  • Model reduction in linear regression by stepwise elimination of predictors with "non-significant" coefficients
  • Did Queen (or Freddie Mercury) really not like Star Wars?
  • Correct anonymization of submission using Latex
  • Would superhuman elites allow for more liberal governance?
  • How to fold or expand the wingtips on Boeing 777?
  • Movie / episode where a spaceplane is stuck in orbit
  • The quest for a Wiki-less Game
  • Is there a Christian denomination that teaches that God cannot heal?
  • Is this map real?
  • What are the steps to write a book?
  • Wrong explanation for why "electron can't exist in the nucleus"?
  • I want to be a observational astronomer, but have no idea where to start
  • How solid is the claim that Alfred Nobel found the Nobel Prize specifically because of his invention of dynamite?
  • Parsing and processing "resolvectl statistics" output using awk

assignment zsh

IMAGES

  1. A Guide to the Zsh Completion with Examples

    assignment zsh

  2. A Guide to the Zsh Completion With Examples

    assignment zsh

  3. A Guide to the Zsh Completion With Examples

    assignment zsh

  4. How to Use Zsh: A Beginner's Guide

    assignment zsh

  5. Unix & Linux: ZSH: how to escape the following command (variable

    assignment zsh

  6. What is ZSH, and Why Should You Use It Instead of Bash?

    assignment zsh

VIDEO

  1. बेटा हमसे होशियारी #funny #comedy #arvindcomedy108

  2. go to hashtag#gotosound

  3. who finishes all the steps first ?

  4. yamraj chhutti par the nahi to #knowledge #luckiestpeoplealive #factsmine #youtubeviralshort

  5. Find The ODD Emoji Out Quiz #howgoodareyoureyes #shorts

  6. AOTX072402TV Special

COMMENTS

  1. macos

    I use ZSH for my terminal shell, and whilst I've written several functions to automate specific tasks, I've never really attempted anything that requires the functionality I'm after at the moment. I've recently re-written a blog using Jekyll and I want to automate the production of blog posts and finally the uploading of the newly produced ...

  2. A User's Guide to the Z-Shell

    Chapter 5: Substitutions

  3. Fixing "zsh: bad assignment" error in Linux

    An alias is a name that is translated as another name or command (or a set of commands). So, I tried to create the alias in the following manner: alias my_short_command = "command 1; command 2 && command 3; command 4". And it threw me the following error: zsh: bad assignment. If you are a regular user of the Linux command line, you must have ...

  4. zsh

    Here a list of what each file should/shouldn't contain, in my opinion:.zshenv [Read every time] This file is always sourced, so it should set environment variables which need to be updated frequently.PATH (or its associated counterpart path) is a good example because you probably don't want to restart your whole session to make it update.By setting it in that file, reopening a terminal ...

  5. macos

    Instead, Zsh treats them as UNIX-like commands. Screenshot of the problem on the Terminal Application - variable assignment problem for Zsh shell scripts. In the screenshot linked above, I did the following on the Terminal application. Showed the contents of the simple Zsh shell script.

  6. variable

    From the zsh manual regarding the typeset builtin (which local is a special case of): Unlike parameter assignment statements, typeset 's exit status on an assignment that involves a command substitution does not reflect the exit status of the command substitution.

  7. How to make a permanent alias in oh-my-zsh?

    How to make a permanent alias in oh-my-zsh?

  8. Why does ZSH local variable assignment fail?

    1. If you run your script with -x (both bash and zsh) you will see that the $ (...) code gets interpreted/parsed differently. This is because, as stated in the FAQ, word splitting in zsh is backwards/bash/sh incompatible. You can use SH_WORD_SPLIT to address this difference.

  9. inline conditionals for assignment

    6. Zsh being zsh, there is a cryptic way: This sets V to the value of FOO if VERBOSE is a nonzero number, and to the empty string if VERBOSE is empty or 0. This sets V to the value of FOO if VERBOSE is the exact string 1, and to the empty string otherwise. Now forget this and use the clear syntax with if or case.

  10. Ternary assignment in zsh : r/zsh

    Zsh goes further and performs this kind of substitution recursively and with full arithmetic evaluation on every level. This means that something as simple as $(( $3 )) or even $(( foo )) can perform arbitrary deep expansion and arbitrary complex computation.

  11. (eval):15 bad assignment when using '=' as alias #523

    This is similar to #263 but I get a different error: (eval):15: bad assignment As a result, all plugin aliases are gone. I'm using the zsh calc plugin, which aliases the =. When I remove this plugin, I get no errors and got all plugin al...

  12. Bash script throws "assignment to invalid subscript range" when running

    It sounds like you're asking zsh to interpret that script. You don't say what updateExpediaGitRepos is, but I suppose that alias sources that script, using the . or source builtin command. Those are the commands to tell the current shell interpreter to interpret code in a file, so the shebang (#! /bin/bash) is not relevant.The shebang is only used by the kernel when you try to execute a script.

  13. Omsk Oblast (Russia): Cities and Settlements in Population

    Contents: Cities and Settlements The population of all cities and urban settlements in Omsk Oblast according to census results and latest official estimates. The icon links to further information about a selected place including its population structure (gender).

  14. Module:Location map/data/Russia Omsk Oblast

    Main page; Contents; Current events; Random article; About Wikipedia; Contact us; Donate; Pages for logged out editors learn more

  15. Omsk Oblast, Russia guide

    Omsk Oblast - Overview. Omsk Oblast is a federal subject of Russia located in the south-eastern part of Siberia, in the Siberian Federal District. Omsk is the capital city of the region. The population of Omsk Oblast is about 1,879,500 (2022), the area - 141,140 sq. km.

  16. zsh: bad subscript for direct array assignment: 0

    zsh: bad subscript for direct array assignment: 0. Ask Question Asked 2 years, 7 months ago. Modified 2 years, 7 months ago. Viewed 1k times 0 I have the following bashscript below. ... zsh arrays start from one (unless you have the KSH_ARRAYS variable set). See man zshparam and search for Array Subscripts; Share.

  17. shell

    264. If you really need to use an alias with a parameter for some reason, you can hack it by embedding a function in your alias and immediately executing it: alias example='f() { echo Your arg was $1. };f'. I see this approach used a lot in .gitconfig aliases. answered Sep 8, 2016 at 16:10.

  18. Omsk Oblast

    Omsk Oblast (Russian: О́мская о́бласть, romanized: Omskaya oblast') is a federal subject of Russia (an oblast), located in southwestern Siberia.The oblast has an area of 139,700 square kilometers (53,900 sq mi). Its population is 1,977,665 (2010 Census) [9] with the majority, 1.12 million, living in Omsk, the administrative center.One of the Omsk streets

  19. bash

    Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI features for Teams; OverflowAPI Train & fine-tune LLMs; Labs The future of collective knowledge sharing; About the company Visit the blog