Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Environment Variable with Special characters Post 302644291 by sethmj on Monday 21st of May 2012 03:07:29 PM
Old 05-21-2012
hello Neurtonscott,

It works fine... but can you explain what this code is doing?


unset latest
Code:
for file in FILE_NM_?(20120515|20120516)??????_sas.sig
do
  [[ $file -nt $latest ]] && latest=$file
done

Especially the switches and the content withing the do loop!

Moderator's Comments:
Mod Comment Please use code tags

Last edited by Scott; 05-21-2012 at 05:14 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Special characters getting replaced by &Pound in Unix Environment

Hi, Please find the Question Summary below- In our email template document(.txt) bullets and Apostrophe are getting replaced by the string "&pound" in our Live environment.We are using sun solaris 8 in live. Can anybody let me know why this happens and how to prevent this . Thanks... (0 Replies)
Discussion started by: kaushik05
0 Replies

2. Shell Programming and Scripting

Variable Manimpulation - special characters

Hello- I have a variables that contains a string like this usr/pass@SCHEMA I want to extract the usr/pass part and ignore the SCHEMA part, I tried to use this ${dbconn%%@} and apparently it will not work because @ is a special character. I tried \@ and still no go. Any idea how to solve... (1 Reply)
Discussion started by: Nomaad
1 Replies

3. Shell Programming and Scripting

Special characters in a bash variable in sed

Hello, I am trying the following: echo __CHANGEME__ >> testfile VAR1="&&&" sed -i "s|__CHANGEME__|${VAR1}|" testfile cat testfile This results in testfile containing __CHANGEME____CHANGEME____CHANGEME__ Whereas I want it to result in &&& I understand that if VAR1="\&\&\&" then... (3 Replies)
Discussion started by: linuxnewbeee
3 Replies

4. UNIX for Dummies Questions & Answers

How to see special characters?

Hi all, I was wondering how can i see the special characters like \t, \n or anything else in a file by using Nano or any other linux command like less, more etc (6 Replies)
Discussion started by: gvj
6 Replies

5. Shell Programming and Scripting

Sed failing for variable with special characters

This has been covered many times earlier but couldnt figure the issue myself. Can you please advise whats wrong on the below code I have a variable with special character ($) and am using that variable to replace another variable in file but however sed is failing to parse it correctly ... (7 Replies)
Discussion started by: sasiharitha
7 Replies

6. Shell Programming and Scripting

special characters

Hey guys, I'm trying to replace "]Facebook" from the text but sed 's/]Facebook/Johan/g' is not working could you please help me with that? (6 Replies)
Discussion started by: Johanni
6 Replies

7. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

8. Shell Programming and Scripting

Trouble with sed and substituting a string with special characters in variable

Hey guys, I know that title is a mouthful - I'll try to better explain my struggles a little better... What I'm trying to do is: 1. Query a db and output to a file, a list of column data. 2. Then, for each line in this file, repeat these values but wrap them with: ITEM{ ... (3 Replies)
Discussion started by: ampsys
3 Replies

9. Shell Programming and Scripting

Parsing special characters from variable commands

Hi, I am fairly new to unix scripting and recently tasked with some reporting scripts. The reporting checks several batch jobs and this is quite iterative. Now I am trying to minimize script effort and maximize reusability as there are only slight nuances in the repetitive tasks. For... (3 Replies)
Discussion started by: joeniks
3 Replies

10. Shell Programming and Scripting

awk match shell variable that contains special characters?

How to match a shell variable that contains parenthesis (and other special characters like "!") file.txt contains: Charles Dickens Matthew Lewis (writer) name="Matthew Lewis (writer)"; awk -v na="$name" ' $0 ~ na' file.txt Ideally this would match $name in file.txt (in this... (3 Replies)
Discussion started by: Mid Ocean
3 Replies
RAPID(6)							       Games								  RAPID(6)

NAME
rapid - content download tool for spring SYNOPSIS
rapid [options] <action> [<argument>] rapid-spring [options] <action> [<argument>] DESCRIPTION
Rapid manages downloads of content for the spring RTS engine. OPTIONS
action in the command line is one of: upgrade: Install the latest package for all pinned tags. clean-upgrade: Equivalent to 'upgrade' followed by 'uninstall-unpinned'. pin: Pins a tag and installs the latest package for that tag. unpin: Unpins a tag. Does not uninstall any packages. install: Install a package. Does not pin any tags. uninstall: Uninstall a package. Unpin its tag if any. list-tags: List all tags that contain <argument>. list-pinned-tags: Idem, but only pinned tags. list-packages: List all packages whose name contains <argument>. list-installed-packages: Idem, but only installed packages. uninstall-unpinned: Keep only the pinned tags and all dependencies. collect-pool: Remove pool files not needed by any installed package. make-sdd: Extract pool files into a .sdd archive. these are the possible options: -h, --help show this help message and exit --datadir=DATADIR Override the default data directory. (~/.spring on Linux or the one reported by unitsync on Windows) --unitsync Use unitsync to locate the data directory Spring uses. --no-unitsync Do not use unitsync. EXAMPLES
rapid pin xta:latest # installs latest XTA rapid pin s44:latest # installs latest Spring: 1944 rapid upgrade # upgrade all pinned tags SEE ALSO
rapid-gui(6), spring(6) AUTHOR
Tobi Vollebregt <tobivollebregt@gmail.com> This manual page was written by Jan Dittberner <jandd@debian.org>, for the Debian project (but may be used by others). rapid August 2010 RAPID(6)
All times are GMT -4. The time now is 06:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy